<template>
  <div class="container">
    <img src="@/assets/img/error.png">
    <p>{{errorData[errorCode]}} </p>
  </div>
</template>
<script>
import errorData from '@/datas/error.js'
import { useStore } from 'vuex'
import { onMounted } from 'vue'
import loadData from '@/server'
export default {
  name: 'errorpage',
  props: {
    errorCode: Number
  },
  setup() {
    const store = useStore()
    onMounted(() => {
      loadData(store)
    })

    return { errorData }
  }
}
</script>
<style lang="less" scoped>
.container {
  position: fixed;
  top: 82px;
  height: 50%;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  img {
    width: 70px;
    height: 70px;
  }
  p {
    font-size: 16px;
    color: #999;
  }
}
</style>
